package com.zhuang.designpattern.decorator;

/**
 * description: SsoInterceptor
 * date: 2022/9/18 10:44
 * author: Zhuang
 * version: 1.0
 */
public class SsoInterceptor implements HandlerInterceptor {

    public boolean preHandle(String request, String response, Object handler) {
        // 模拟获取cookie
        String ticket = request.substring(1, 8);
        // 模拟校验
        return ticket.equals("success");
    }

}
